Skip to content

Conversation

@KpoDja
Copy link

@KpoDja KpoDja commented Feb 19, 2023

No description provided.

@@ -1,9 +1,9 @@
# Задание 1
# Необходимо вывести имена всех учеников из списка с новой строки

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужно в репозиторий добавлять служебные файлы

# ???

print(f"{len(groups)} всего групп")
for index, group in enumerate(groups):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно в enumerate через start указать номер с которого начинать

]
# ???

for student in students:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут квадратичная сложность, потому что count будет весб список перебирать каждый раз. Лучше такого избегать

]
# ???

duplicates = [x for i, x in enumerate(students) if i != students.index(x)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

аналогично, index это как еще один цикл. Итого цикл в цикле

count_list = []
for dic_student in s_class:
count_list.append(dic_student["first_name"])
count_dic = Counter(count_list)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно сразу в коунтер добавлять без промежточного списка

# ???

word_one = 'Архангельск'
glasniye = ["а", "я", "у", "ю", "о", "е", "ё", "э", "и", "ы"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно просто написать буквы слитно

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants